/*
 * SDeviceSpectrumAnalyzer.h
 *
 *  Created on: 7 déc. 2010
 *      Author: sm228513
 */

#ifndef SDEVICESPECTRUMANALYZER_H_
#define SDEVICESPECTRUMANALYZER_H_

#include "SDK/SDevice/SDeviceGpib.h"
#include "SDK/SData/SData2D.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
/// \class	SDeviceSpectrumAnalyzer
///
/// \brief	Device spectrum analyzer. 
///
/// \author	Sylvain Martin
/// \date	1/20/2011
/// 		
/// \nosubgrouping
/// 							
/// \ingroup SDeviceMod
/// 		 
/// \sa SDevicePSAE4440A
////////////////////////////////////////////////////////////////////////////////////////////////////

class SDeviceSpectrumAnalyzer: public SDeviceGpib {


public:
	SDeviceSpectrumAnalyzer(QObject *parent=0);
	///\nosubgrouping

	//@name Measurement parameters
	//@{
	Q_INVOKABLE virtual void setFreqStart(double const freq)=0;
	Q_INVOKABLE virtual double freqStart()=0;

	Q_INVOKABLE virtual void setFreqStop(double const freq)=0;
	Q_INVOKABLE virtual double freqStop()=0;

	Q_INVOKABLE virtual void setRbw(double const RBW)=0;
	Q_INVOKABLE virtual double rbw()=0;

	Q_INVOKABLE virtual void setAttenuation(int const Att)=0;
	Q_INVOKABLE virtual int  attenuation()=0;

	Q_INVOKABLE virtual void setNbPoints(int const NbPts)=0;
	Q_INVOKABLE virtual int nbPoints()=0;

	Q_INVOKABLE virtual void setNbAverage(int const NbAvrg)=0;
	Q_INVOKABLE virtual int nbAverage() =0 ;

	Q_INVOKABLE virtual void setRefLevel(double RefLvl)=0;
	Q_INVOKABLE virtual double refLevel()=0;

	Q_INVOKABLE virtual double sweepTime()=0;

	//@}

	//@name Miscellaneous 
	//@{
	Q_INVOKABLE virtual void setMarker(double const frequence, int num=1)=0;
	Q_INVOKABLE virtual void marker(bool OnOff, int num=1)=0;
	Q_INVOKABLE virtual double readMarker(int num=1)=0;
	//@}
	
	//@name Measurement
	//@{
	virtual SData2D * readSpectrum()=0;
	Q_INVOKABLE virtual QScriptValue qsReadSpectrum()=0;
	//@}
};

#endif /* SDEVICESPECTRUMANALYZER_H_ */
